#ifndef __CIRCLE_H__
#define __CIRCLE_H__

#include <iostream>
#include "Shape.h"
#include "CRectangle.h"
#include "HandleCollisions.h"

using namespace std;

static enum{PRECISION = 3};

class Circle: public Shape
{
	int m_radius;

	bool legalRadius(int radius) const ;
public:
	void set( Point p1, int radius);//,  double dirX,  double dirY);
	void setRadius(int radius);
	unsigned int getRadius () const {return m_radius;}
	bool input();
	bool draw(char frameCh, bool fill=false, MyScreen * scr = NULL, 
					bool split = false);
	bool search(const Point& p1) const ;
	void print4Points (	double x, double y, 
						double currXAxis = 0, double currYAxis = 0, 
						int modFactorX = MAX_SCREEN_X-1, int modFactorY = MAX_SCREEN_Y-1, 
						MyScreen * scr = NULL, bool split = false, char frameCh = '*');
	bool isInBorders() const ;

	virtual void handleCollision (CRectangle * rec);
	virtual void handleCollision (Circle * circ);
	virtual void handleCollision (Shape * shape);
	virtual bool checkStuck (const MyScreen & scr) const;
	virtual bool writeToText(ofstream &file)  ;
};

#endif

